package edu.mit.media.fv.components
{
	import flash.display.*;
	import flash.events.FocusEvent;
	import flash.filters.*;
	import flash.text.*;
	
	public class AQTextArea extends MovieClip
	{
		var _label:TextField;
		
		private var _focusIn:Boolean = false;
		private var _mouseIn:Boolean = false;
		private var _glow:GlowFilter = new GlowFilter(0xFFFFFF,0.8,15,15);
		private var _bevel:BevelFilter = new BevelFilter(
			5, 45, 0x333333, 1, 0xFFFFFF, 1, 3, 3, 1, 1);
			
		public function AQTextArea()
		{
			super();
		}
		private function processFocusGained(event:FocusEvent):void{
			this._focusIn = true;
			this.filters = [this._glow, this._bevel];
		}
		private function processFocusLost(event:FocusEvent):void{
			this._focusIn = false;
			this.filters = [this._bevel];
		}
		public function get text():String{
			return this._label.text;
		}
		public function set text(txt:String):void{
			this._label.text = txt;
		}
		public function set editable(o:Boolean):void{
			if(o){
				this._label.type = TextFieldType.DYNAMIC;
				//this._field.selectable = false;
			}else{
				this._label.type = TextFieldType.DYNAMIC;
				//this._field.selectable = false;
			}
		}
		public function setTextFormat(format:TextFormat):void{
			this._label.setTextFormat(format);
		}
		public function set displayAsPassword(o:Boolean):void{
			this._label.displayAsPassword = o;
		}
		
	}
}